package com.reborn.mall.api.controller;

import com.reborn.mall.api.model.entity.PopularRecommend;
import com.reborn.mall.api.model.entity.Product;
import com.reborn.mall.api.service.NewProductRecommendService;
import com.reborn.mall.api.service.PopularRecommendService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 人气推荐表-Controller
 *
 * @author wu.yue
 * @since 2020/2/19
 */
@RestController
@RequestMapping("/marketing/popular")
public class PopularRecommendController extends BaseController<PopularRecommend> {


    @Autowired
    private PopularRecommendService service;

    @GetMapping("/list")
    public List<Product> findRecommendedProducts() {
        return service.findRecommendedProducts();
    }
}
